﻿using System.Web.Mvc;
using Zavand.Web.Mvc.Manana.SampleWebsite.Controllers.My;
using Zavand.Web.Mvc.Manana.SampleWebsite.Common;

namespace Zavand.Web.Mvc.Manana.SampleWebsite.Controllers
{
    public class HomeController : SampleWebsiteController
    {
        public ActionResult Index(IndexRoute r)
        {
            ViewBag.Message = "Welcome to ASP.NET MVC!";
            var m = new IndexModel();
            m.SetupModel(this, r);
            return View(m);
        }

        public ActionResult About()
        {
            return View();
        }
    }
    public class IndexModel : SampleWebsiteModel<IndexRoute, HomeController>, ILayout<IndexRoute>
    {
    }
    public class IndexRoute : SampleWebsiteRoute
    {
        public IndexRoute()
        {
            Controller = "Home";
            Action = "Index";
        }
//        public override string GetUrl()
//        {
//            return "";
//        }
//        public override string GetUrlLocalized()
//        {
//            return "{locale}";
//        }
        public override object GetDefaults()
        {
//            return null;
            return new
            {
                Action,
                Controller = "Home"
            };
        }
//        public override object GetDefaultsLocalized()
//        {
//            return new
//            {
//                Action,
//                Controller = "Home",
//                Locale=GetDefaultLocale()
//            };
//        }

    }
}
